VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TestMethodCaller"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mHolder As ObjectHolder
Private mCaller As MethodCaller
Private mCount As Integer

Public Sub testSingleCall()
givenMethodCaller
whenCalled
thenCountIncreased
End Sub

''
''
''
Private Sub givenMethodCaller()
Set mHolder = New ObjectHolder
Set mCaller = New MethodCaller
mCaller.init mHolder, "method"
End Sub

Private Sub whenCalled()
mHolder.object = Me
mCaller.forward
End Sub

Private Sub thenCountIncreased()
assert.equals Count, 1, "Count increased to 1"
'assert.equals mCaller.object, Me, "Caller called me"
End Sub

'Public method available to be called by a MethodCaller
Public Sub method()
mCount = mCount + 1
End Sub


Public Function NumOfAsserts() As Long
NumOfAsserts = 1
End Function


Public Property Get Count() As Variant
Count = mCount
End Property

